//
//  HZBottomTabBarButton.m
//  WangYiNews
//
//  Created by WangPengHua on 16/1/10.
//  Copyright © 2016年 PengHua Wang. All rights reserved.
//

#import "HZBottomTabBarButton.h"

@implementation HZBottomTabBarButton
// 取消系统的点击按钮的高亮效果
- (void)setHighlighted:(BOOL)highlighted{
}
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.titleLabel.font = [UIFont systemFontOfSize:13];
        self.imageView.contentMode = UIViewContentModeCenter;
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}

#pragma mark - 设置位置
- (void)layoutSubviews{
    [super layoutSubviews];
//    CGFloat imgX = (self.width - self.imageView.width) / 2;
    self.imageView.frame = CGRectMake(0, 0, self.width, 28);
    self.titleLabel.frame = CGRectMake(0, CGRectGetMaxY(self.imageView.frame), self.width, 21);
}
@end
